import { xhrGet, xhrPostJson } from "@/services";
import { DynamicObjectAny } from '@/typings';
export const apiUrl = {refresh: `/ves/preVoucher/refresh`, // 刷新,
    getBreadName: `/asm/formType/detail`, // 获取面包屑中文名称,
};
const REJECT_PARAMS = ['createUser, createTime', 'status'];

export const transformRejectParams = (
  params: DynamicObjectAny
): DynamicObjectAny => {
  const newParams: DynamicObjectAny = {};

  Object.keys(params || {}).forEach(key => {
    if (!REJECT_PARAMS.includes(key)) {
      newParams[key] = params[key];
    }
  });

  return newParams;
};

export const refresh = (pa:any)=>{
     return xhrPostJson(apiUrl.refresh, pa);
}

// 获取面包屑
export  const getBreadName = (pa:any)=>{
  return xhrPostJson(apiUrl.getBreadName, pa);
}